package org.thread.test05.syn.homework.demo04;

/**
 * @author CSY
 * @date 2025 - 03 - 13
 */
public class MyThread extends Thread {
    private String name;
    private String msg;
    private Printer printer;

    public MyThread(){}

    public MyThread(String name, String msg, Printer printer) {
        this.name = name;
        this.msg = msg;
        this.printer = printer;
    }

    @Override
    public void run() {
        printer.print(name,msg);
    }
}
